/*
 * Copyright (C) 2013 The i18nCTS Authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.googlecode.i18nCTS.view;

import java.text.NumberFormat;
import java.util.Locale;

import android.util.Log;

import com.googlecode.i18nCTS.provider.i18nCTSProvider;

public class NumberSectionFragment extends AbstractSectionFragment {
	private static final String TAG = "I18nCTS_" + NumberSectionFragment.class.getSimpleName();
	public static final String CATEGORY = "Number";

	public NumberSectionFragment() {
		Log.d(TAG, "ctr");
	}
		
	@Override
	public String getCategory() {
		return CATEGORY;
	}
	
	public void buildList(i18nCTSProvider provider) {
		provider.addData(NumberFormat.getInstance(Locale.getDefault()).format(123456789), "NumberFormat. getInstance(locale). format(123456789)");
		provider.addData(NumberFormat.getCurrencyInstance(Locale.getDefault()).format(1234567.89), "NumberFormat. getCurrencyInstance(locale). format(1234567.89)");
		provider.addData(NumberFormat.getInstance(Locale.getDefault()).format(0.12345), "NumberFormat. getInstance(locale). format(0.12345)");
		provider.addData(NumberFormat.getPercentInstance(Locale.getDefault()).format(0.123), "NumberFormat. getPercentInstance(locale). format(0.123)");	
		provider.addTitle(CATEGORY);
	}
}